package com.lunm.im.factory;


import com.lunm.im.protocol.MessageCodecSharable;
import com.lunm.im.server.handler.*;
import io.netty.handler.logging.LogLevel;
import io.netty.handler.logging.LoggingHandler;

/**
 * @program: mi-server
 * @author: Shawn
 * @create: 2024-12-28 18:53
 */
public class HandlerFactory {
    private static final MessageCodecSharable MESSAGE_CODEC = new MessageCodecSharable();
    private static final LoggingHandler LOGGING_HANDLER = new LoggingHandler(LogLevel.DEBUG);
    private static final LoginRequestHandler LOGIN_HANDLER = new LoginRequestHandler();
    private static final ChatRequestHandler CHAT_HANDLER = new ChatRequestHandler();
    private static final GroupCreateRequestHandler GROUP_CREATE_HANDLER = new GroupCreateRequestHandler();
    private static final GroupChatRequestHandler GROUP_CHAT_HANDLER = new GroupChatRequestHandler();
    private static final GroupMembersRequestHandler GROUP_MEMBER_HANDLER = new GroupMembersRequestHandler();
    private static final GroupJoinRequestHandler GROUP_JOIN_HANDLER = new GroupJoinRequestHandler();
    private static final GroupQuitRequestHandler GROUP_QUIT_HANDLER = new GroupQuitRequestHandler();
    private static final RpcRequestMessageHandler RPC_REQUEST_HANDLER = new RpcRequestMessageHandler();
    private static final RpcResponseMessageHandler RPC_RESPONSE_HANDLER = new RpcResponseMessageHandler();


    public static MessageCodecSharable getMessageCodec() {return MESSAGE_CODEC;}
    public static LoggingHandler getLoggingHandler() {return LOGGING_HANDLER;}
    public static LoginRequestHandler getLoginRequestHandler() {return LOGIN_HANDLER;}
    public static ChatRequestHandler getChatRequestHandler() {return CHAT_HANDLER;}
    public static GroupCreateRequestHandler getGroupCreateRequestHandler() {return GROUP_CREATE_HANDLER;}
    public static GroupChatRequestHandler getGroupChatRequestHandler() {return GROUP_CHAT_HANDLER;}
    public static GroupMembersRequestHandler getGroupMemberRequestHandler() {return GROUP_MEMBER_HANDLER;}
    public static GroupJoinRequestHandler getGroupJoinRequestHandler() {return GROUP_JOIN_HANDLER;}
    public static GroupQuitRequestHandler getGroupQuitRequestHandler() {return GROUP_QUIT_HANDLER;}
    public static RpcRequestMessageHandler getRpcRequestHandler() {return RPC_REQUEST_HANDLER;}
    public static RpcResponseMessageHandler getRpcResponseHandler() {return RPC_RESPONSE_HANDLER;}

}
